Over a year ago, I wrote a concept for a “Guess 2/3 of the Average” dApp Game Design.
I happened to think about it again, and now with the powerful assistance of ChatGPT, implementing the game has become much simpler—both the contract and the frontend can be completed easily. Today, I spent just 2 hours to finish a demo of the web version.
You can access the game through this page: https://guessavg.oiia.network/
A few things to note:
This dApp mini-game is currently running on the Oiia Network. Contract address: 0x6eb07...BA8F1
Participating in the game essentially means calling a contract function and transferring some money to the contract, for example: transaction 0x1bfb2...10936
The contract code is in the repository guessavg/contract. In theory, it can be deployed on any network. Since OIIA is free, I used it.
The frontend code is in guessavg/game, used in conjunction with the contract code.
You can get some OIIA from the faucet: https://faucet.oiia.network/
This private key has 10 OIIA, and can be used to try the game. However, from a game mechanics standpoint, the same address cannot participate multiple times. You need to transfer the OIIA to a new address first.
When the frontend tries to add the Oiia network to Metamask, an error pops up, but it actually succeeds. I didn’t investigate the cause in depth. A month ago, the same code didn’t throw an error.
The Oiia Network may disappear at any time.
Just for fun…